<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
<%@ include file="/common/common-css.jsp" %>
<style>
		#jquery-table td{cursor:pointer !important}
		.load_bg{background:#000;opacity:0.1;left:0px;top:0px;position:fixed;height:100%;width:100%;overflow:hidden;z-index:10000;}
		.load_img{left:50%;top:180px;position:fixed;height:50px;overflow:hidden;z-index:20000;}
		</style>
	</head>
<body  class="no-skin">

<div  class="load_bg" style="display:none"></div>
<img src="http://img.xmiles.cn/commentloading.gif" class="load_img" style="display:none"/>
	<div class="page-content"> 
		<form id="queryForm" action="" method="POST"> 
			<div class="page-content-area"> 
				<div class="row">
  					<div class="col-sm-12">
						<div class="widget-box" style="border:0px solid #ccc; border-top:none;border-bottom:none;margin-top:15px;">
							<hr style="margin-top:0px;margin-bottom:0x">
								<div class="widget-header widget-header-blue widget-header-flat">
									<h4 class="widget-title">请选择配置</h4>
									<div class="widget-toolbar">
										<a href="#" data-action="collapse">
											<i class="ace-icon fa fa-chevron-up"></i>
										</a>
									</div>
							</div>
							<div class=" widget-body">
								<div class="widget-main" >
								
								<div class="form-group col-xs-12 col-sm-4">
												<label class="col-sm-2 control-label"  style="text-align:right">活动类型：</label>
												 <div class="col-sm-4">
													<div class="input-daterange input-group col-sm-12">
															<s:select id="activity_type" name="activity_type" list="%{paramsMap.activityList}" listKey="activity_type" listValue="activity_type_name" 
															headerKey="" headerValue="---请选择---" cssClass="form-control"></s:select>
													</div>
												</div>
											</div>
		
											<div class="form-group col-xs-12 col-sm-4">
												<label class="col-sm-2 control-label"  style="text-align:right" >短信类型:</label>
												 <div class="col-sm-4">
													<div class="input-daterange input-group col-sm-6">
														<select id="message_type" name="message_type">
															<option value="">---请选择---</option>
															<option value="1">常规外推</option>
															<option value="2">外推联登页</option>
															<option value="3">征信外部推广页</option>
															<option value="4">API页</option>
															<option value="5">外部API联登</option>
														</select>
													</div>
												</div>
											</div>
		
									</div><!-- /.widget-main -->
								</div><!-- /.widget-body -->
						</div><!-- /.widget-box -->
					</div><!-- /.col-sm-12 -->
					
					<div class="col-md-12 center">
						<div class="clearfix form-actions">
				
							<button class="btn btn-purple  no-border" type="button" name="btn-query" onclick="query_any()" id="btn-query" > 
								<i class="ace-icon fa fa-search icon-on-right bigger-110"></i> 
								保存
							</button> 
							&nbsp;&nbsp;&nbsp;
							<button class="btn btn-grey  no-border" type="reset">
								<i class="ace-icon fa fa-undo icon-on-right bigger-110"></i>
								重置
							</button>
							
				 		 </div>
		  			 </div>
				
				</div><!-- /.row -->
				
				<div class="row">
					
					<!-- /.col -->
				</div>
					 
				<hr style="display:none;" id="delete_hr">
					<div class="row">
					<div class="col-xs-12">
						<table id="jquery-table" class="table table-striped table-bordered table-hover">
						</table>
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div><!-- /.page-content-area -->
		</form>
	</div><!-- /.page-content -->
				
<%@ include file="/common/common-js.jsp" %>

<!-- inline scripts related to this page -->

<script type="text/javascript">

	function query_any(){
		var activity_type=$('#activity_type').val();
		var message_type=$('#message_type').val();
		
		if(''==activity_type||null==activity_type){
			alert("活动类型不能为空，请选择！");
			return;
		}
		if(''==message_type||null==message_type){
			alert("短信类型不能为空，请选择！");
			return;
		}
		
		$.ajax({
			   type: "POST",
			   url: ctx +"/smsconfig/saveorupdate.action",
			   data: "activity_type="+activity_type+"&message_type="+message_type,
			   success: function(data){
				   alert(data.result);
			   },
			   dataType:"json"
			});
	}
	
	
</script>
</body>
</html>
